﻿///***************************************************************
/// 시  스  템 : Updms.Car.Dac
/// 단위시스템 : CAR
/// 계      층 : Data Access Layer
/// 프로그램명 : Car_Dac_UPDMS_CAR_SERVICE_PARTS
/// 파  일  명 : Car_Dac_UPDMS_CAR_SERVICE_PARTS.cs
/// 설      명 : 정비관리 - 부품
///***************************************************************
/// 수정ID 일자       이름     내용
///---------------------------------------------------------------
/// CH001  2008-09-02 송시명   최초 작성
///***************************************************************
using System.Data;
using System.Data.SqlClient;
using System.EnterpriseServices;
using System.Runtime.InteropServices;

using SMFramework.Data;

namespace Updms.Car.Dac
{
	[ComVisible(true)]
	[Transaction(TransactionOption.Supported)]
	[JustInTimeActivation(true)]
	public class Car_Dac_UPDMS_CAR_SERVICE_PARTS : Base.AppFramework.DacBase
	{
		public Car_Dac_UPDMS_CAR_SERVICE_PARTS()
		{
		}

		#region NT [GetSavedPartsList]

		/// <summary>
		/// 저장된 부품정보 조회
		/// </summary>
		/// <param name="lo_dp"></param>
		/// <returns></returns>
		[AutoComplete]
		public DataSet GetSavedPartsList(DataPack lo_dp)
		{
			string strSql = "usp_UPDMS_CAR_SERVICE_PARTS_Get_Saved_Parts_List";

			SqlParameter[] paramArray = lo_dp.ToSqlParameters();

			DataSet ds = new DataSet();
			return _agent.Fill(strSql, "UPDMS_CAR_SERVICE_PARTS", ds, paramArray, CommandType.StoredProcedure);
		}

		#endregion

		#region RT [Insert]
		
		/// <summary>
		/// 정비부품 저장 - XML형식
		/// </summary>
		/// <param name="ls_data"></param>
		/// <returns></returns>
		[AutoComplete]
		public int Insert(string ls_xml)
		{
			string strSql = "usp_UPDMS_CAR_SERVICE_PARTS_Insert_Update_Xml";

			SqlParameter[] paramArray =
			{
				new SqlParameter("ls_xml", ls_xml)
			};

			return _agent.ExecuteNonQuery(strSql, paramArray, CommandType.StoredProcedure);
		}

		#endregion
	
	}
}
